<?php
/* @var $this ItemController */
/* @var $model Item */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'item-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'category'); ?>
		<?php echo $form->dropDownList($model, 'category',$htmlOptions=array('Wires'=>'Wires','Cables' =>'Cables', 'Components' =>'Components','Roughing-Ins' =>'Roughing-Ins',  'Hangers and Support' =>'Hangers and Support',  'Boxes and Fittings' =>'Boxes and Fittings','Conduits and Connectors' =>'Conduits and Connectors','Consumables' =>'Consumables'),array('prompt' => 'Select Category')) ?>
		<?php echo $form->error($model,'category'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'date_added'); ?>
	<?php $this-> widget ('zii.widgets.jui.CJuiDatePicker', array('model'=>$model, 'attribute'=>'date_added','options' => array ('dateFormat' => 'yy-mm-dd','yearRange' => '-20:+20','changeYear' => 'true','changeMonth' => 'true',),));?>
		<?php echo $form->error($model,'date_added'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'brand'); ?>
<?php echo $form->dropDownList($model, 'brand',$htmlOptions=array('Alantek'=>'Alantek','AMP' =>'AMP', 'Linkbasic' =>'Linkbasic','LS' =>'LS',  'ICSI' =>'ICSI',  'Belden' =>'Belden','Generic' =>'Generic'),array('prompt' => 'Select Brand')) ?>
		<?php echo $form->error($model,'brand'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'item_desc'); ?>
		<?php echo $form->textField($model,'item_desc',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'item_desc'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'item_code'); ?>
		<?php echo $form->textField($model,'item_code',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'item_code'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'color'); ?>
		<?php echo $form->textField($model,'color',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'color'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'unit'); ?>
		<?php echo $form->textField($model,'unit',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'unit'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'unit_price'); ?>
		<?php echo $form->textField($model,'unit_price'); ?>
		<?php echo $form->error($model,'unit_price'); ?>
	</div>


	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->